package com.fzy.common.filter;

import javax.servlet.*;
import java.io.IOException;


/**
 * 垃圾回收filter
 *
 * @author shiyuehe
 */
public class GCFilter implements Filter {

    @Override
    public void destroy() {

    }

    @Override
    public void doFilter(ServletRequest req, ServletResponse res, FilterChain chain) throws IOException, ServletException {
        chain.doFilter(req, res);

        /**
         * 清空缓存
         */
        PalmServletContext.clear();
    }

    @Override
    public void init(FilterConfig arg0) throws ServletException {

    }

}
